﻿using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace Phoenix.Xna.Framework.ContentPipeline.Models
{
    [ContentTypeWriter]
    public class InstancedModelWriter : ContentTypeWriter<InstancedModelContent>
    {
        protected override void Write(ContentWriter output, InstancedModelContent value)
        {
            //List<InstancedModelPart> parts = ReflectionHelper.GetField<InstancedModelContent, List<InstancedModelPart>>(
            //    value,
            //    "_modelParts");
            //output.Write(parts.Count);

            //foreach (InstancedModelPart p in parts)
            //{
            //    output.WriteObject<InstancedModelPart>(p);
            //}
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(InstancedModelReader).AssemblyQualifiedName;
        }
    }
}
